package com.ljx.recruitment.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ljx.recruitment.common.domain.vo.resp.PageResp;
import com.ljx.recruitment.user.domain.entity.Role;
import com.ljx.recruitment.user.domain.vo.req.RolePageReq;
import com.ljx.recruitment.user.domain.vo.req.RoleSubmitReq;
import com.ljx.recruitment.user.domain.vo.req.RoleToUserReq;
import com.ljx.recruitment.user.domain.vo.resp.MenuResp;

import java.util.List;

public interface RoleService extends IService<Role> {
    List<Long> getUserRoleIdByUserId(Long userId);

    List<Role> getRoleByIds(List<Long> roleIds);

    void allocationToUser(RoleToUserReq req);

    List<Role> getRoleLikeName(String roleName);

    PageResp<Role> getPage(RolePageReq req);

    Role submit(RoleSubmitReq req);

    List<Long> getPermissions(Long roleId);

    List<Long> getMenus(Long roleId);

    void saveRolePermissionsById(Long id, List<Long> permissionIds);

    void saveRoleMenusById(Long id, List<Long> menuIds);

    Role getByName(String roleName);

    void insertUserRole(Long userId, Long roleId);

    void deleteUserRole(Long userId);
}
